package org.jeecg.modules.test.seata.order.feign.fallback;

import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.test.seata.order.feign.AccountClient;

import java.math.BigDecimal;

/**
 * 进入fallback的方法 检查是否token未设置
 * @author: jeecg-boot
 */
@Slf4j
public class AccountClientFallback implements AccountClient {



    @Setter
    private Throwable cause;

    @Override
    public String reduceBalance(Long userId, BigDecimal amount) {
        log.error("余额扣减失败 {}", cause);
        return null;
    }
}
